package com.com.effectivejava.commonmethods.equals;

import java.awt.*;

/**
 * Created by pankaj on 7/12/14.
 */
public class TransivityProblem {

    public static void main(String[] args) {

    }
}

class Point {
    private final int x;
    private final int y;
    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
    @Override public boolean equals(Object o) {
        if (!(o instanceof Point))
            return false;
        Point p = (Point)o;
        return p.x == x && p.y == y;
    }

}

class ColorPoint extends Point {
    private final Color color;

    public ColorPoint(int x, int y, Color color) {
        super(x, y);
        this.color = color;
    }
}

